<%@ Page Language="C#" MasterPageFile="~/MP/Classic.master" AutoEventWireup="true" Inherits="ConfigCusto_EditMainMenu" Codebehind="EditMainMenu.aspx.cs"  RoleHint="Administrator" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageContainer" runat="Server">
    <h1>
        Main menu configuration</h1>
    <asp:GridView ID="MainMenuItemsGrid" runat="server" AutoGenerateColumns="False" OnRowDeleting="MainMenuItemsGrid_RowDeleting"
        Width="100%">
        <Columns>
            <asp:BoundField DataField="Description" HeaderText="Description">
                <HeaderStyle Width="100px" />
            </asp:BoundField>
            <asp:BoundField DataField="Url" HeaderText="Url">
                <HeaderStyle Width="150px" />
            </asp:BoundField>
            <asp:CheckBoxField DataField="IsPublic" HeaderText="Public" />
            <asp:CommandField DeleteText="Remove" ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    <table>
        <tr>
            <td>
                <asp:TextBox ID="DescriptionTextBox" runat="server" Width="75px"></asp:TextBox>&nbsp;
                <asp:RequiredFieldValidator ID="DescriptionRequired" runat="server"
                    ErrorMessage="Please enter a description for the item" ControlToValidate="DescriptionTextBox">*</asp:RequiredFieldValidator>
            </td>
            <td>
                <asp:TextBox ID="UrlTextBox" runat="server" Width="200px"></asp:TextBox>&nbsp;
                <asp:RequiredFieldValidator ID="UrlRequired" runat="server" ErrorMessage="Please enter a url for the item"
                    ControlToValidate="UrlTextBox">*</asp:RequiredFieldValidator>
            </td>
            <td>
                <asp:CheckBox ID="IsPublicCheckbox" runat="server" /></td>
            <td>
                <asp:Button ID="AddButton" runat="server" Text="Add" OnClick="AddButton_Click" Width="50px" /></td>
        </tr>
    </table>
    <asp:Button ID="SaveButton" runat="server" Text="Save configuration" OnClick="SaveButton_Click"
        CausesValidation="False" />
    <asp:ValidationSummary ID="ValidationSummary" runat="server" />
</asp:Content>
